const mongoose = require('../db')
const Schema = mongoose.Schema

const schema = new Schema({
  id: { type: String, required: true },
  title: { type: String, required: true },
  author: { type: String, required: true },
  desc: { type: String, required: true },
  createTime: { type: String, required: true },
  content: { type: String, required: true },
  recommend: { type: Number, required: true },
  flag: { type: Number, required: true },
  img: { type: String, required: true },
})

module.exports = mongoose.model('News', schema)